<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<meta name="generator" content="JsDoc Toolkit" />
		
		<title>JsDoc Reference - BE.SettingsManager</title>
		<link href="../css/default.css" type="text/css" rel="stylesheet" media="all" />
	</head>

	<body>
		<div id="header">
</div>

		<div class="index">
			<div class="menu">
				<!-- begin publish.classesIndex -->
				<div align="center"><a href="../index.html">Class Index</a> | <a href="../files.html">File Index</a></div>

<h2 class="heading1">Classes</h2>

<ul class="classList">
	
		<li><a href="../symbols/_global_.html">_global_</a></li>
	
		<li><a href="../symbols/Array.html">Array</a></li>
	
		<li><a href="../symbols/BE.html">BE</a></li>
	
		<li><a href="../symbols/BE.comp.html">BE.comp</a></li>
	
		<li><a href="../symbols/BE.ERROR.html">BE.ERROR</a></li>
	
		<li><a href="../symbols/BE.layer.html">BE.layer</a></li>
	
		<li><a href="../symbols/BE.log.html">BE.log</a></li>
	
		<li><a href="../symbols/BE.proj.html">BE.proj</a></li>
	
		<li><a href="../symbols/BE.SettingsManager.html">BE.SettingsManager</a></li>
	
		<li><a href="../symbols/BE.time.html">BE.time</a></li>
	
		<li><a href="../symbols/BE.ui.html">BE.ui</a></li>
	
		<li><a href="../symbols/BE.ui.viewsConstructor.html">BE.ui.viewsConstructor</a></li>
	
		<li><a href="../symbols/String.html">String</a></li>
	
</ul>

				<!-- end publish.classesIndex -->
			</div>
			
			<div class="fineprint" style="clear:both">
				&copy;2010<br />
				Generated by <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.3.2 on Thu Jan 13 2011 17:56:10 GMT-0600 (CST)<br />
				HTML template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a>
			</div>
		</div>
		
		<div class="content">
			<div class="innerContent">
				<h1 class="classTitle">
					
					Class <span>BE.SettingsManager</span>
				</h1>

				<p class="description summary">
					
					
					
				
					
					
					
						<br /><em>Defined in: </em> <a href="../symbols/src/_Users_elevate_Dropbox_Scripts_AEScripts_BeforeEffects_src_inc_modules_BE_SettingsManager.jsxinc.html">BE_SettingsManager.jsxinc</a>.
					
				</p>

				
					<div class="props">
						<table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class BE.SettingsManager.">
							<caption>Class Summary</caption>
							<thead>
								<tr>
									<th scope="col">Constructor Attributes</th>
									<th scope="col">Constructor Name and Description</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td class="attributes">&nbsp;</td>
									<td class="nameDescription" >
										<div class="fixedFont">
											<b><a href="../symbols/BE.SettingsManager.html#constructor">BE.SettingsManager</a></b>(sectionName, settings)
										</div>
										<div class="description">Provides a way to easily store and retrieve settings that After Effects
should save.</div>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				

				
					
					
						<div class="props">
							<table class="summaryTable" cellspacing="0" summary="A summary of the fields documented in the class BE.SettingsManager.">
								<caption>Field Summary</caption>
								
								<thead>
									<tr>
										<th scope="col">Field Attributes</th>
										<th scope="col">Field Name and Description</th>
									</tr>
								</thead>
								
								<tbody>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">
												<b><a href="../symbols/BE.SettingsManager.html#sectionName">sectionName</a></b>
												</div>
												<div class="description">The name for After Effects to use as this group of settings' section
name.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont">
												<b><a href="../symbols/BE.SettingsManager.html#settings">settings</a></b>
												</div>
												<div class="description">The settings Object that contains the settings to be managed by this
SettingsManager.</div>
											</td>
										</tr>
									
								</tbody>
							</table>
						</div>
					
					
					
				

	<!--
	#### METHODS SUMMARY
	-->
				
					
					
						<div class="props">
							<table class="summaryTable" cellspacing="0" summary="A summary of the methods documented in the class BE.SettingsManager.">
								<caption>Method Summary</caption>
								
								<thead>
									<tr>
										<th scope="col">Method Attributes</th>
										<th scope="col">Method Name and Description</th>
									</tr>
								</thead>
								
								<tbody>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#get">get</a></b>(settingName)
												</div>
												<div class="description">Returns the current value of a setting.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#load">load</a></b>(settingName)
												</div>
												<div class="description">Loads a single setting.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#loadAll">loadAll</a></b>()
												</div>
												<div class="description">Loads all of the settings being managed by this SettingsManager.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#noSettings">noSettings</a></b>()
												</div>
												<div class="description">Checks to see if there aren't any settings associated with this
SettingsManager.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#save">save</a></b>(settingName)
												</div>
												<div class="description">Saves the given setting.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#saveAll">saveAll</a></b>()
												</div>
												<div class="description">Saves all of the settings being managed by this SettingsManager.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#set">set</a></b>(settingName, settingValue)
												</div>
												<div class="description">Sets a setting value.</div>
											</td>
										</tr>
									
										<tr>
											<td class="attributes">&nbsp;</td>
											<td class="nameDescription">
												<div class="fixedFont"><b><a href="../symbols/BE.SettingsManager.html#settingExists">settingExists</a></b>(settingName)
												</div>
												<div class="description">Checks to see if a given setting exists within this SettingsManager.</div>
											</td>
										</tr>
									
								</tbody>
							</table>
						</div>
					
					
					
				
				
	<!--
	#### EVENTS SUMMARY
	-->
				

	<!--
	#### CONSTRUCTOR DETAILS
	-->
				
					<div class="details props">
						<div class="innerProps">
							<a name="constructor"></a>
							
							<div class="sectionTitle">
								Class Detail
							</div>
							
							<div class="fixedFont">
								<b>BE.SettingsManager</b>(sectionName, settings)
							</div>
							
							<div class="description">
								Provides a way to easily store and retrieve settings that After Effects
should save. Settings are automatically saved on <code>set</code> and loaded
on <code>get</code>.
								
							</div>
							
							
								
									<pre class="code">  var settingsManager = BE.SettingsManager("My Script Name",
      {
          "settingOne": "Setting One Value",
          "settingTwo": "Setting Two Value"
      }
  );
  settingsManager.get("settingOne");  //"Setting One Value"
  settingsManager.set("settingOne", "New Setting One Value");
  settingsManager.get("settingOne");  //"New Setting One Value");</pre>
								
							
						
							
								<dl class="detailList params">
									<dt class="heading">Parameters:</dt>
									
										<dt>
											<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span>  <b>sectionName</b>
											
										</dt>
										<dd>The name that After Effects should use as this
group of setting's sectionName. This can be the name of your script.</dd>
									
										<dt>
											<span class="light fixedFont">{Object}</span>  <b>settings</b>
											
										</dt>
										<dd>An Object filled with key/value pairs to be saved
within After Effect's settings. If this argument is not provided, settings
will need to be added by using the <code>add<code> method.</dd>
									
								</dl>
							
							
							
								<dl class="detailList nomargin">
									
									
									
									
									
									
									
										<dt class="heading">Returns:</dt>
										
												<dd><span class="light fixedFont">{SettingsManager}</span> A BE.SettingsManager.</dd>
										
									
									
									
									
									
								</dl>
							
						</div>
					</div>
				

	<!--
	#### FIELD DETAILS
	-->
				
					<div class="details props">
						<div class="innerProps">

							<div class="sectionTitle">
								Field Detail
							</div>
							
							
								<a name="sectionName"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>sectionName</b>							
								</div>
								
								<div class="description">
									The name for After Effects to use as this group of settings' section
name.
									
									
									
								</div>
								
								

								
								
								<div class="hr"></div>
							
								<a name="settings"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									
									
									<b>settings</b>							
								</div>
								
								<div class="description">
									The settings Object that contains the settings to be managed by this
SettingsManager.
									
									
									
								</div>
								
								

								
								
								
							
						</div>
					</div>
				

	<!--
	#### METHOD DETAILS
	-->		
				
					<div class="details props">
						<div class="innerProps">
							<div class="sectionTitle">
								Method Detail
							</div>
							
							
								<a name="get"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{<a href="../symbols/String.html">String</a>}</span>
									
									<b>get</b>(settingName)
								</div>
								
								<div class="description">
									Returns the current value of a setting. It is an error if the given
setting does not exist.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
												
											</dt>
											<dd>The name of the setting to get the value for.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
											<dt class="heading">Throws:</dt>
											
												<dt>
													 <b></b>
												</dt>
												<dd>errors.SETTING_DOES_NOT_EXIST</dd>
											
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> The value of the given setting.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="load"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{SettingsManager}</span>
									
									<b>load</b>(settingName)
								</div>
								
								<div class="description">
									Loads a single setting. It is an error if the given setting does not
exist.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
												
											</dt>
											<dd>The name of the setting to load.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
											<dt class="heading">Throws:</dt>
											
												<dt>
													 <b></b>
												</dt>
												<dd>errors.SETTING_DOES_NOT_EXIST</dd>
											
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="loadAll"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{SettingsManager}</span>
									
									<b>loadAll</b>()
								</div>
								
								<div class="description">
									Loads all of the settings being managed by this SettingsManager. It is an
error if no settings have been registered with this SettingsManager.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
											<dt class="heading">Throws:</dt>
											
												<dt>
													 <b></b>
												</dt>
												<dd>errors.NO_SETTINGS</dd>
											
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="noSettings"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Bool}</span>
									
									<b>noSettings</b>()
								</div>
								
								<div class="description">
									Checks to see if there aren't any settings associated with this
SettingsManager.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Bool}</span> True if there aren't any settings associated with this
SettingsManager or false if there is at least one.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="save"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{SettingsManager}</span>
									
									<b>save</b>(settingName)
								</div>
								
								<div class="description">
									Saves the given setting. It is an error if the setting does not exist
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
												<i>Optional</i>
											</dt>
											<dd>The setting to save or, if undefined,
save all settings.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
											<dt class="heading">Throws:</dt>
											
												<dt>
													 <b></b>
												</dt>
												<dd>errors.SETTING_DOES_NOT_EXIST</dd>
											
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="saveAll"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{SettingsManager}</span>
									
									<b>saveAll</b>()
								</div>
								
								<div class="description">
									Saves all of the settings being managed by this SettingsManager. If no
settings exists, there is no error; the settings will simply not be
saved.
									
									
									
									
								</div>
								
								
								
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="set"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{SettingsManager}</span>
									
									<b>set</b>(settingName, settingValue)
								</div>
								
								<div class="description">
									Sets a setting value. If a setting doesn't exist, the setting is created.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<b>settingName</b>
												
											</dt>
											<dd></dd>
										
											<dt>
												<b>settingValue</b>
												
											</dt>
											<dd></dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{SettingsManager}</span> The SettingsManager. Useful for chaining.</dd>
											
										
										
										
										
										
									
									</dl>
								

								<div class="hr"></div>
							
								<a name="settingExists"></a>
								
								<div class="fixedFont heading">
									<span class='lighter'>
									
									</span>
									
									<span class="light">{Bool}</span>
									
									<b>settingExists</b>(settingName)
								</div>
								
								<div class="description">
									Checks to see if a given setting exists within this SettingsManager.
									
									
									
									
								</div>
								
								
								
								
									<dl class="detailList params">
										<dt class="heading">Parameters:</dt>
										
											<dt>
												<span class="light fixedFont">{<a href="../symbols/String.html">String</a>}</span> <b>settingName</b>
												
											</dt>
											<dd>The name of the setting to check for
existence.</dd>
										
									</dl>
								
								
								
									<dl class="detailList nomargin">
									
										
										
										
										
										
										
										
											<dt class="heading">Returns:</dt>
											
												<dd><span class="light fixedFont">{Bool}</span> True if a given setting exists or false if it doesn't.</dd>
											
										
										
										
										
										
									
									</dl>
								

								
							
						</div>
					</div>
				
				
	<!--
	#### EVENT DETAILS
	-->		
				
			</div>
		</div>
	</body>
</html>
